﻿package com.schimanek.utils 
{
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	
	/**
	 * ...
	 * @author DefaultUser (Tools -> Custom Arguments...)
	 */
	public class LoadData 
	{
		
		public function LoadData() 
		{
			
		}
		
		public static function load(path:String,completeHandler:Function):void {
			var urlRequest:URLRequest = new URLRequest(path);
			var urlLoader:URLLoader = new URLLoader();
			
			urlLoader.addEventListener(Event.COMPLETE, completeHandler);			
			urlLoader.load(urlRequest);	
		}
	}
	
}